home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 11 code / The NetWork Project.sea / The NetWork Project / Examples (Sources) / NetSim / task.impl.p < prev    next >
MacBinary  |  1992-07-15  |  10.6 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Jul 15 16:25:54 1992, modified Wed Jul 15 16:25:54 1992, creator 'MPS ', type ASCII, 10074 bytes "task.impl.p" , at 0x27da 627 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 74 61 73 6b 2e 69 | 6d 70 6c 2e 70 00 00 00 |..task.i|mpl.p...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 27 5a 00 | 00 02 73 a6 8a 3a 52 a6 |.....'Z.|..s..:R.|
|00000060| 8a 3a 52 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.:R.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f7 ac 00 00 |........|........|
|00000080| 7b a9 20 47 2e 20 53 61 | 77 69 74 7a 6b 69 2c 20 |{. G. Sa|witzki, |
|00000090| 53 74 61 74 4c 61 62 20 | 48 65 69 64 65 6c 62 65 |StatLab |Heidelbe|
|000000a0| 72 67 20 31 39 38 36 2d | 31 39 39 31 7d 09 0d 0d |rg 1986-|1991}...|
|000000b0| 7b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |{-------|--------|
|000000c0| 2d 2d 20 4d 61 69 6e 20 | 52 6f 75 74 69 6e 65 73 |-- Main |Routines|
|000000d0| 20 20 20 20 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ----|--------|
|000000e0| 2d 2d 2d 2d 2d 2d 7d 0d | 0d 0d 50 52 4f 43 45 44 |------}.|..PROCED|
|000000f0| 55 52 45 20 4d 79 49 6e | 69 74 3b 20 7b 28 76 61 |URE MyIn|it; {(va|
|00000100| 72 20 54 68 65 53 74 61 | 74 65 20 3a 20 54 61 73 |r TheSta|te : Tas|
|00000110| 6b 53 74 61 74 65 54 79 | 70 65 29 7d 0d 0d 63 6f |kStateTy|pe)}..co|
|00000120| 6e 73 74 20 0d 09 63 68 | 73 69 7a 65 3d 31 32 38 |nst ..ch|size=128|
|00000130| 3b 20 63 68 64 65 6c 74 | 61 3d 35 3b 0d 09 63 76 |; chdelt|a=5;..cv|
|00000140| 73 69 7a 65 3d 31 32 38 | 3b 20 63 76 64 65 6c 74 |size=128|; cvdelt|
|00000150| 61 3d 35 3b 09 0d 09 63 | 76 74 73 69 7a 65 3d 34 |a=5;...c|vtsize=4|
|00000160| 30 3b 0d 76 61 72 20 6d | 79 54 61 73 6b 48 61 6e |0;.var m|yTaskHan|
|00000170| 64 6c 65 72 3a 74 54 61 | 73 6b 48 61 6e 64 6c 65 |dler:tTa|skHandle|
|00000180| 72 3b 0d 09 6d 79 4d 61 | 73 74 65 72 54 61 73 6b |r;..myMa|sterTask|
|00000190| 48 61 6e 64 6c 65 72 3a | 74 4d 61 73 74 65 72 54 |Handler:|tMasterT|
|000001a0| 61 73 6b 48 61 6e 64 6c | 65 72 3b 0d 09 6d 79 53 |askHandl|er;..myS|
|000001b0| 6c 61 76 65 54 61 73 6b | 48 61 6e 64 6c 65 72 3a |laveTask|Handler:|
|000001c0| 74 53 6c 61 76 65 54 61 | 73 6b 48 61 6e 64 6c 65 |tSlaveTa|skHandle|
|000001d0| 72 3b 0d 09 6d 79 54 61 | 73 6b 47 65 6e 65 72 61 |r;..myTa|skGenera|
|000001e0| 74 6f 72 3a 74 4d 79 54 | 61 73 6b 47 65 6e 65 72 |tor:tMyT|askGener|
|000001f0| 61 74 6f 72 3b 0d 09 6d | 79 52 65 73 75 6c 74 48 |ator;..m|yResultH|
|00000200| 61 6e 64 6c 65 72 3a 74 | 52 65 70 6c 79 52 65 73 |andler:t|ReplyRes|
|00000210| 75 6c 74 48 61 6e 64 6c | 65 72 3b 0d 09 68 3a 4d |ultHandl|er;..h:M|
|00000220| 65 6e 75 48 61 6e 64 6c | 65 3b 0d 09 73 3a 73 74 |enuHandl|e;..s:st|
|00000230| 72 32 35 35 3b 0d 09 69 | 3a 69 6e 74 65 67 65 72 |r255;..i|:integer|
|00000240| 3b 0d 09 6d 79 4e 61 6d | 65 50 74 72 3a 5e 73 74 |;..myNam|ePtr:^st|
|00000250| 72 33 31 3b 0d 09 70 74 | 79 70 3a 69 6e 74 65 67 |r31;..pt|yp:integ|
|00000260| 65 72 3b 0d 09 68 63 3a | 74 43 6f 6e 66 69 67 75 |er;..hc:|tConfigu|
|00000270| 72 61 74 69 6f 6e 48 61 | 6e 64 6c 65 3b 65 72 72 |rationHa|ndle;err|
|00000280| 3a 6f 73 65 72 72 3b 0d | 09 68 31 3a 68 61 6e 64 |:oserr;.|.h1:hand|
|00000290| 6c 65 3b 0d 09 6d 79 50 | 69 63 3a 50 69 63 48 61 |le;..myP|ic:PicHa|
|000002a0| 6e 64 6c 65 3b 0d 0d 70 | 72 6f 63 65 64 75 72 65 |ndle;..p|rocedure|
|000002b0| 20 66 61 74 61 6c 3b 0d | 76 61 72 0d 09 73 63 72 | fatal;.|var..scr|
|000002c0| 6c 3a 6c 6f 6e 67 69 6e | 74 3b 0d 62 65 67 69 6e |l:longin|t;.begin|
|000002d0| 0d 09 09 70 72 6f 67 72 | 65 73 73 72 65 70 6f 72 |...progr|essrepor|
|000002e0| 74 28 30 2c 27 4e 65 74 | 53 69 6d 20 27 29 3b 0d |t(0,'Net|Sim ');.|
|000002f0| 09 09 70 72 6f 67 72 65 | 73 73 72 65 70 6f 72 74 |..progre|ssreport|
|00000300| 28 31 2c 27 63 6f 75 6c | 64 20 6e 6f 74 20 62 65 |(1,'coul|d not be|
|00000310| 20 6c 61 75 6e 63 68 65 | 64 27 29 3b 0d 09 09 70 | launche|d');...p|
|00000320| 72 6f 67 72 65 73 73 72 | 65 70 6f 72 74 28 33 2c |rogressr|eport(3,|
|00000330| 27 54 68 69 73 20 70 72 | 6f 67 72 61 6d 20 6e 65 |'This pr|ogram ne|
|00000340| 65 64 73 20 61 20 4e 65 | 74 57 6f 72 6b 20 50 72 |eds a Ne|tWork Pr|
|00000350| 6f 63 65 73 73 6f 72 27 | 29 3b 0d 09 09 70 72 6f |ocessor'|);...pro|
|00000360| 67 72 65 73 73 72 65 70 | 6f 72 74 28 32 2c 27 54 |gressrep|ort(2,'T|
|00000370| 68 69 73 20 70 72 6f 67 | 72 61 6d 20 6e 65 65 64 |his prog|ram need|
|00000380| 73 20 43 6f 6c 6f 72 51 | 75 69 63 6b 64 72 61 77 |s ColorQ|uickdraw|
|00000390| 27 29 3b 0d 09 09 70 72 | 6f 67 72 65 73 73 72 65 |');...pr|ogressre|
|000003a0| 70 6f 72 74 28 34 2c 27 | 50 6c 65 61 73 65 20 63 |port(4,'|Please c|
|000003b0| 6f 6e 73 75 6c 74 20 74 | 68 65 20 64 6f 63 75 6d |onsult t|he docum|
|000003c0| 65 6e 74 61 74 69 6f 6e | 2e 27 29 3b 0d 09 09 53 |entation|.');...S|
|000003d0| 68 6f 77 50 72 6f 67 72 | 65 73 73 3b 7b 6d 61 6b |howProgr|ess;{mak|
|000003e0| 65 20 73 68 75 72 65 20 | 61 6c 6c 20 69 73 20 64 |e shure |all is d|
|000003f0| 72 61 77 6e 20 61 6e 64 | 20 76 69 73 69 62 6c 65 |rawn and| visible|
|00000400| 7d 0d 09 09 44 65 6c 61 | 79 28 33 30 30 2c 73 63 |}...Dela|y(300,sc|
|00000410| 72 6c 29 3b 0d 09 09 68 | 61 6c 74 3b 0d 65 6e 64 |rl);...h|alt;.end|
|00000420| 3b 0d 0d 42 45 47 49 4e | 0d 09 68 31 3a 3d 47 65 |;..BEGIN|..h1:=Ge|
|00000430| 74 52 65 73 6f 75 72 63 | 65 28 27 4e 53 53 59 27 |tResourc|e('NSSY'|
|00000440| 2c 31 32 38 29 3b 0d 09 | 69 66 20 47 65 74 48 61 |,128);..|if GetHa|
|00000450| 6e 64 6c 65 53 69 7a 65 | 28 68 31 29 3c 3e 73 69 |ndleSize|(h1)<>si|
|00000460| 7a 65 4f 66 28 74 43 6f | 6e 66 69 67 75 72 61 74 |zeOf(tCo|nfigurat|
|00000470| 69 6f 6e 29 20 74 68 65 | 6e 20 50 72 6f 67 72 61 |ion) the|n Progra|
|00000480| 6d 42 72 65 61 6b 28 27 | 62 61 64 20 4e 53 53 59 |mBreak('|bad NSSY|
|00000490| 20 72 65 73 6f 75 72 63 | 65 20 73 69 7a 65 27 29 | resourc|e size')|
|000004a0| 3b 0d 09 68 63 3a 3d 74 | 43 6f 6e 66 69 67 75 72 |;..hc:=t|Configur|
|000004b0| 61 74 69 6f 6e 48 61 6e | 64 6c 65 28 68 31 29 3b |ationHan|dle(h1);|
|000004c0| 0d 09 65 72 72 3a 3d 52 | 65 73 45 72 72 6f 72 3b |..err:=R|esError;|
|000004d0| 69 66 20 28 65 72 72 3c | 3e 6e 6f 45 72 72 29 20 |if (err<|>noErr) |
|000004e0| 7c 20 28 68 63 3d 6e 69 | 6c 29 20 74 68 65 6e 20 || (hc=ni|l) then |
|000004f0| 50 72 6f 67 72 61 6d 42 | 72 65 61 6b 28 27 63 6f |ProgramB|reak('co|
|00000500| 75 6c 64 20 6e 6f 74 20 | 6c 6f 61 64 20 4e 53 53 |uld not |load NSS|
|00000510| 59 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 27 |Y config|uration'|
|00000520| 29 3b 0d 09 69 66 20 68 | 63 5e 5e 2e 76 65 72 73 |);..if h|c^^.vers|
|00000530| 69 6f 6e 3c 3e 35 20 74 | 68 65 6e 20 50 72 6f 67 |ion<>5 t|hen Prog|
|00000540| 72 61 6d 42 72 65 61 6b | 28 27 62 61 64 20 4e 53 |ramBreak|('bad NS|
|00000550| 53 59 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |SY confi|guration|
|00000560| 20 76 65 72 73 69 6f 6e | 27 29 20 0d 09 65 6c 73 | version|') ..els|
|00000570| 65 20 74 68 65 43 6f 6e | 66 69 67 75 72 61 74 69 |e theCon|figurati|
|00000580| 6f 6e 3a 3d 68 63 5e 5e | 3b 0d 0d 09 52 65 6c 65 |on:=hc^^|;...Rele|
|00000590| 61 73 65 52 65 73 6f 75 | 72 63 65 28 68 61 6e 64 |aseResou|rce(hand|
|000005a0| 6c 65 28 68 63 29 29 3b | 0d 0d 09 67 4e 65 78 74 |le(hc));|...gNext|
|000005b0| 4e 65 74 52 65 66 72 65 | 73 68 3a 3d 74 69 63 6b |NetRefre|sh:=tick|
|000005c0| 63 6f 75 6e 74 2b 43 4e | 65 74 52 65 66 72 65 73 |count+CN|etRefres|
|000005d0| 68 44 65 6c 74 61 3b 0d | 0d 09 67 53 6f 6c 64 52 |hDelta;.|..gSoldR|
|000005e0| 65 73 75 6c 74 73 3a 3d | 27 27 3b 0d 0d 09 6e 65 |esults:=|'';...ne|
|000005f0| 78 74 54 69 63 6b 73 3a | 3d 74 69 63 6b 43 6f 75 |xtTicks:|=tickCou|
|00000600| 6e 74 2b 54 69 63 6b 73 | 44 65 6c 74 61 3b 0d 09 |nt+Ticks|Delta;..|
|00000610| 72 65 70 65 61 74 20 75 | 6e 74 69 6c 20 52 65 61 |repeat u|ntil Rea|
|00000620| 64 44 61 74 65 54 69 6d | 65 28 6f 6c 64 54 69 6d |dDateTim|e(oldTim|
|00000630| 65 29 3d 6e 6f 45 72 72 | 3b 0d 09 67 6f 6c 64 74 |e)=noErr|;..goldt|
|00000640| 69 6d 65 3a 3d 6f 6c 64 | 74 69 6d 65 3b 0d 09 6e |ime:=old|time;..n|
|00000650| 72 52 65 73 75 6c 74 73 | 3a 3d 30 3b 0d 09 67 6e |rResults|:=0;..gn|
|00000660| 72 52 65 73 75 6c 74 73 | 3a 3d 30 3b 0d 09 67 50 |rResults|:=0;..gP|
|00000670| 72 6f 74 6f 63 6f 6c 4f | 6e 3a 3d 66 61 6c 73 65 |rotocolO|n:=false|
|00000680| 3b 0d 09 77 69 74 68 20 | 74 68 65 43 6f 6e 66 69 |;..with |theConfi|
|00000690| 67 75 72 61 74 69 6f 6e | 20 64 6f 20 62 65 67 69 |guration| do begi|
|000006a0| 6e 0d 09 09 69 66 20 09 | 53 68 6f 77 43 6f 6e 74 |n...if .|ShowCont|
|000006b0| 72 6f 6c 4d 65 6e 75 20 | 74 68 65 6e 20 62 65 67 |rolMenu |then beg|
|000006c0| 69 6e 20 0d 09 09 09 49 | 6e 73 65 72 74 4d 65 6e |in ....I|nsertMen|
|000006d0| 75 28 47 65 74 4d 65 6e | 75 28 31 32 38 29 2c 30 |u(GetMen|u(128),0|
|000006e0| 29 3b 0d 09 09 09 44 72 | 61 77 4d 65 6e 75 42 61 |);....Dr|awMenuBa|
|000006f0| 72 3b 0d 09 09 65 6e 64 | 3b 0d 09 65 6e 64 3b 0d |r;...end|;..end;.|
|00000700| 0d 09 7b 70 72 65 70 61 | 72 65 20 79 6f 75 72 20 |..{prepa|re your |
|00000710| 77 6f 72 6b 61 72 65 61 | 20 68 65 72 65 7d 0d 09 |workarea| here}..|
|00000720| 67 54 61 73 6b 53 74 61 | 74 65 20 3a 3d 20 54 61 |gTaskSta|te := Ta|
|00000730| 73 6b 4e 65 77 3b 0d 0d | 09 69 66 20 49 6e 69 74 |skNew;..|.if Init|
|00000740| 4e 65 74 77 6f 72 6b 28 | 4e 65 74 57 6f 72 6b 45 |Network(|NetWorkE|
|00000750| 76 74 29 3c 3e 4e 6f 45 | 72 72 20 74 68 65 6e 20 |vt)<>NoE|rr then |
|00000760| 66 61 74 61 6c 3b 0d 09 | 69 66 20 4e 6c 49 6e 69 |fatal;..|if NlIni|
|00000770| 74 3c 3e 6e 6f 45 72 72 | 20 74 68 65 6e 20 66 61 |t<>noErr| then fa|
|00000780| 74 61 6c 3b 0d 0d 09 7b | 4e 65 74 57 6f 72 6b 53 |tal;...{|NetWorkS|
|00000790| 63 68 65 64 75 6c 65 72 | 20 69 6e 73 74 61 6c 6c |cheduler| install|
|000007a0| 61 74 69 6f 6e 7d 0d 09 | 6e 65 77 28 4e 65 74 57 |ation}..|new(NetW|
|000007b0| 6f 72 6b 53 63 68 65 64 | 75 6c 65 72 29 3b 0d 09 |orkSched|uler);..|
|000007c0| 69 66 20 4e 65 74 57 6f | 72 6b 53 63 68 65 64 75 |if NetWo|rkSchedu|
|000007d0| 6c 65 72 3d 6e 69 6c 20 | 74 68 65 6e 20 66 61 74 |ler=nil |then fat|
|000007e0| 61 6c 3b 0d 0d 09 4e 65 | 74 57 6f 72 6b 53 63 68 |al;...Ne|tWorkSch|
|000007f0| 65 64 75 6c 65 72 2e 69 | 6e 69 74 3b 0d 09 0d 09 |eduler.i|nit;....|
|00000800| 69 66 20 4e 65 74 57 6f | 72 6b 53 63 68 65 64 75 |if NetWo|rkSchedu|
|00000810| 6c 65 72 2e 65 72 72 3d | 4e 6f 45 72 72 20 74 68 |ler.err=|NoErr th|
|00000820| 65 6e 20 0d 09 62 65 67 | 69 6e 20 0d 09 09 4e 65 |en ..beg|in ...Ne|
|00000830| 74 57 6f 72 6b 53 63 68 | 65 64 75 6c 65 72 2e 54 |tWorkSch|eduler.T|
|00000840| 61 73 6b 49 74 65 72 61 | 74 69 6f 6e 73 3a 3d 74 |askItera|tions:=t|
|00000850| 68 65 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 2e |heconfig|uration.|
|00000860| 73 61 6d 70 6c 65 73 69 | 7a 65 3b 0d 09 09 53 74 |samplesi|ze;...St|
|00000870| 61 74 69 73 74 69 63 57 | 69 6e 64 6f 77 3a 3d 6e |atisticW|indow:=n|
|00000880| 69 6c 3b 0d 0d 0d 09 09 | 77 69 74 68 20 6e 66 6f |il;.....|with nfo|
|00000890| 72 6d 20 64 6f 20 62 65 | 67 69 6e 0d 09 09 09 73 |rm do be|gin....s|
|000008a0| 74 79 6c 65 3a 3d 20 46 | 69 78 65 64 44 65 63 69 |tyle:= F|ixedDeci|
|000008b0| 6d 61 6c 3b 0d 09 09 09 | 64 69 67 69 74 73 3a 3d |mal;....|digits:=|
|000008c0| 32 3b 0d 09 09 45 4e 44 | 3b 0d 0d 09 09 69 66 20 |2;...END|;....if |
|000008d0| 6d 61 73 74 65 72 20 74 | 68 65 6e 20 62 65 67 69 |master t|hen begi|
|000008e0| 6e 20 0d 09 09 09 6e 65 | 77 28 6d 79 4d 61 73 74 |n ....ne|w(myMast|
|000008f0| 65 72 54 61 73 6b 48 61 | 6e 64 6c 65 72 29 3b 09 |erTaskHa|ndler);.|
|00000900| 6d 79 54 61 73 6b 48 61 | 6e 64 6c 65 72 3a 3d 74 |myTaskHa|ndler:=t|
|00000910| 54 61 73 6b 48 61 6e 64 | 6c 65 72 28 6d 79 4d 61 |TaskHand|ler(myMa|
|00000920| 73 74 65 72 54 61 73 6b | 48 61 6e 64 6c 65 72 29 |sterTask|Handler)|
|00000930| 3b 20 0d 0d 0d 09 09 65 | 6e 64 20 65 6c 73 65 20 |; .....e|nd else |
|00000940| 62 65 67 69 6e 20 0d 09 | 09 09 6e 65 77 28 6d 79 |begin ..|..new(my|
|00000950| 53 6c 61 76 65 54 61 73 | 6b 48 61 6e 64 6c 65 72 |SlaveTas|kHandler|
|00000960| 29 3b 09 6e 65 77 28 6d | 79 52 65 73 75 6c 74 48 |);.new(m|yResultH|
|00000970| 61 6e 64 6c 65 72 29 3b | 0d 09 09 09 69 66 20 6d |andler);|....if m|
|00000980| 79 52 65 73 75 6c 74 48 | 61 6e 64 6c 65 72 3c 3e |yResultH|andler<>|
|00000990| 20 6e 69 6c 20 74 68 65 | 6e 20 6d 79 52 65 73 75 | nil the|n myResu|
|000009a0| 6c 74 48 61 6e 64 6c 65 | 72 2e 69 6e 69 74 3b 0d |ltHandle|r.init;.|
|000009b0| 09 09 09 6d 79 53 6c 61 | 76 65 54 61 73 6b 48 61 |...mySla|veTaskHa|
|000009c0| 6e 64 6c 65 72 2e 52 65 | 73 75 6c 74 48 61 6e 64 |ndler.Re|sultHand|
|000009d0| 6c 65 72 3a 3d 6d 79 52 | 65 73 75 6c 74 48 61 6e |ler:=myR|esultHan|
|000009e0| 64 6c 65 72 3b 0d 09 09 | 09 6d 79 54 61 73 6b 48 |dler;...|.myTaskH|
|000009f0| 61 6e 64 6c 65 72 3a 3d | 74 54 61 73 6b 48 61 6e |andler:=|tTaskHan|
|00000a00| 64 6c 65 72 28 6d 79 53 | 6c 61 76 65 54 61 73 6b |dler(myS|laveTask|
|00000a10| 48 61 6e 64 6c 65 72 29 | 3b 0d 0d 0d 09 09 65 6e |Handler)|;.....en|
|00000a20| 64 3b 0d 0d 09 09 7b 6e | 65 77 28 6d 79 54 61 73 |d;....{n|ew(myTas|
|00000a30| 6b 48 61 6e 64 6c 65 72 | 29 3b 7d 0d 09 09 69 66 |kHandler|);}...if|
|00000a40| 20 6d 79 54 61 73 6b 48 | 61 6e 64 6c 65 72 3c 3e | myTaskH|andler<>|
|00000a50| 6e 69 6c 20 74 68 65 6e | 20 4e 65 74 57 6f 72 6b |nil then| NetWork|
|00000a60| 53 63 68 65 64 75 6c 65 | 72 2e 49 6e 69 74 54 61 |Schedule|r.InitTa|
|00000a70| 73 6b 48 61 6e 64 6c 65 | 72 28 6d 79 54 61 73 6b |skHandle|r(myTask|
|00000a80| 48 61 6e 64 6c 65 72 29 | 3b 0d 09 65 6e 64 3b 7b |Handler)|;..end;{|
|00000a90| 69 66 20 4e 65 74 57 6f | 72 6b 53 63 68 65 64 75 |if NetWo|rkSchedu|
|00000aa0| 6c 65 72 2e 65 72 72 3d | 4e 6f 45 72 72 20 74 68 |ler.err=|NoErr th|
|00000ab0| 65 6e 20 7d 0d 0d 0d 09 | 7b 65 6e 64 20 6f 66 20 |en }....|{end of |
|00000ac0| 4e 65 74 57 6f 72 6b 53 | 63 68 65 64 75 6c 65 72 |NetWorkS|cheduler|
|00000ad0| 20 69 6e 73 74 61 6c 6c | 61 74 69 6f 6e 7d 0d 0d | install|ation}..|
|00000ae0| 09 72 61 6e 64 73 65 65 | 64 3a 3d 74 69 63 6b 43 |.randsee|d:=tickC|
|00000af0| 6f 75 6e 74 3b 0d 09 74 | 54 6f 79 5f 69 6e 69 74 |ount;..t|Toy_init|
|00000b00| 28 74 68 65 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |(theConf|iguratio|
|00000b10| 6e 2e 53 61 6d 70 6c 65 | 53 69 7a 65 29 3b 0d 09 |n.Sample|Size);..|
|00000b20| 0d 09 0d 09 64 6f 6f 70 | 65 6e 28 63 6e 65 77 29 |....doop|en(cnew)|
|00000b30| 3b 20 7b 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |; {for e|xample, |
|00000b40| 66 61 6b 65 20 61 20 6e | 65 77 2d 63 6f 6d 6d 61 |fake a n|ew-comma|
|00000b50| 6e 64 7d 0d 09 42 61 73 | 65 57 69 6e 64 6f 77 3a |nd}..Bas|eWindow:|
|00000b60| 3d 46 72 6f 6e 74 77 69 | 6e 64 6f 77 3b 20 7b 6e |=Frontwi|ndow; {n|
|00000b70| 6f 20 63 6c 6f 73 65 20 | 62 6f 78 20 6f 6e 20 74 |o close |box on t|
|00000b80| 68 69 73 20 6f 6e 65 2c | 20 73 6f 20 69 74 20 77 |his one,| so it w|
|00000b90| 69 6c 6c 20 61 6c 77 61 | 79 73 20 65 78 69 73 74 |ill alwa|ys exist|
|00000ba0| 7d 0d 09 62 61 73 65 72 | 65 63 74 3a 3d 42 61 73 |}..baser|ect:=Bas|
|00000bb0| 65 57 69 6e 64 6f 77 5e | 2e 70 6f 72 74 72 65 63 |eWindow^|.portrec|
|00000bc0| 74 3b 0d 09 62 61 73 65 | 72 65 63 74 2e 6c 65 66 |t;..base|rect.lef|
|00000bd0| 74 3a 3d 62 61 73 65 72 | 65 63 74 2e 6c 65 66 74 |t:=baser|ect.left|
|00000be0| 2b 32 30 30 3b 0d 09 66 | 69 6c 6c 52 65 63 74 28 |+200;..f|illRect(|
|00000bf0| 62 61 73 65 72 65 63 74 | 2c 6c 74 67 72 61 79 29 |baserect|,ltgray)|
|00000c00| 3b 0d 0d 09 73 79 73 74 | 65 6d 2e 77 69 6e 64 6f |;...syst|em.windo|
|00000c10| 77 63 6f 75 6e 74 3a 3d | 33 3b 7b 6c 65 61 76 65 |wcount:=|3;{leave|
|00000c20| 20 73 6f 6d 65 20 73 70 | 61 63 65 7d 0d 09 4d 61 | some sp|ace}..Ma|
|00000c30| 6b 65 41 57 69 6e 64 6f | 77 28 27 52 65 63 6f 72 |keAWindo|w('Recor|
|00000c40| 64 20 4d 69 6e 2f 4d 61 | 78 20 53 61 6d 70 6c 65 |d Min/Ma|x Sample|
|00000c50| 73 27 2c 20 33 30 30 2c | 20 31 30 30 2c 20 2d 6e |s', 300,| 100, -n|
|00000c60| 6f 47 72 6f 77 44 6f 63 | 50 72 6f 63 29 3b 0d 09 |oGrowDoc|Proc);..|
|00000c70| 52 65 63 6f 72 64 57 69 | 6e 64 6f 77 3a 3d 46 72 |RecordWi|ndow:=Fr|
|00000c80| 6f 6e 74 77 69 6e 64 6f | 77 3b 0d 09 7b 24 49 66 |ontwindo|w;..{$If|
|00000c90| 63 20 66 61 6c 73 65 7d | 0d 09 6d 69 6e 72 65 63 |c false}|..minrec|
|00000ca0| 74 3a 3d 52 65 63 6f 72 | 64 57 69 6e 64 6f 77 5e |t:=Recor|dWindow^|
|00000cb0| 2e 70 6f 72 74 72 65 63 | 74 3b 0d 09 6d 69 6e 72 |.portrec|t;..minr|
|00000cc0| 65 63 74 2e 62 6f 74 74 | 6f 6d 3a 3d 6d 69 6e 72 |ect.bott|om:=minr|
|00000cd0| 65 63 74 2e 62 6f 74 74 | 6f 6d 2d 35 30 3b 0d 09 |ect.bott|om-50;..|
|00000ce0| 6d 61 78 72 65 63 74 3a | 3d 52 65 63 6f 72 64 57 |maxrect:|=RecordW|
|00000cf0| 69 6e 64 6f 77 5e 2e 70 | 6f 72 74 72 65 63 74 3b |indow^.p|ortrect;|
|00000d00| 0d 09 6d 61 78 72 65 63 | 74 2e 74 6f 70 3a 3d 6d |..maxrec|t.top:=m|
|00000d10| 61 78 72 65 63 74 2e 74 | 6f 70 2b 35 30 3b 0d 09 |axrect.t|op+50;..|
|00000d20| 73 65 74 72 65 63 74 28 | 6d 69 6e 72 65 63 74 2c |setrect(|minrect,|
|00000d30| 30 2c 30 2c 33 30 30 2c | 35 30 29 3b 0d 09 7b 24 |0,0,300,|50);..{$|
|00000d40| 45 6e 64 63 7d 0d 09 09 | 73 65 74 72 65 63 74 28 |Endc}...|setrect(|
|00000d50| 6d 69 6e 72 65 63 74 2c | 30 2c 31 30 2c 31 30 30 |minrect,|0,10,100|
|00000d60| 2c 34 30 29 3b 0d 09 0d | 73 65 74 72 65 63 74 28 |,40);...|setrect(|
|00000d70| 6d 61 78 72 65 63 74 2c | 30 2c 36 30 2c 31 30 30 |maxrect,|0,60,100|
|00000d80| 2c 39 30 29 3b 0d 09 73 | 65 74 70 6f 72 74 28 52 |,90);..s|etport(R|
|00000d90| 65 63 6f 72 64 57 69 6e | 64 6f 77 29 3b 0d 09 0d |ecordWin|dow);...|
|00000da0| 09 6d 69 6e 50 69 63 3a | 3d 6f 70 65 6e 50 69 63 |.minPic:|=openPic|
|00000db0| 74 75 72 65 28 6d 69 6e | 72 65 63 74 29 3b 0d 09 |ture(min|rect);..|
|00000dc0| 73 68 6f 77 70 65 6e 3b | 0d 09 66 72 61 6d 65 72 |showpen;|..framer|
|00000dd0| 65 63 74 28 6d 69 6e 72 | 65 63 74 29 3b 0d 09 66 |ect(minr|ect);..f|
|00000de0| 69 6c 6c 72 65 63 74 28 | 6d 69 6e 72 65 63 74 2c |illrect(|minrect,|
|00000df0| 6c 74 47 72 61 79 29 3b | 0d 09 68 69 64 65 70 65 |ltGray);|..hidepe|
|00000e00| 6e 3b 0d 09 63 6c 6f 73 | 65 50 69 63 74 75 72 65 |n;..clos|ePicture|
|00000e10| 3b 0d 09 0d 09 6d 61 78 | 50 69 63 3a 3d 6f 70 65 |;....max|Pic:=ope|
|00000e20| 6e 50 69 63 74 75 72 65 | 28 6d 61 78 72 65 63 74 |nPicture|(maxrect|
|00000e30| 29 3b 0d 09 73 68 6f 77 | 70 65 6e 3b 0d 09 66 72 |);..show|pen;..fr|
|00000e40| 61 6d 65 72 65 63 74 28 | 6d 61 78 72 65 63 74 29 |amerect(|maxrect)|
|00000e50| 3b 0d 09 66 69 6c 6c 72 | 65 63 74 28 6d 61 78 72 |;..fillr|ect(maxr|
|00000e60| 65 63 74 2c 64 6b 47 72 | 61 79 29 3b 0d 09 68 69 |ect,dkGr|ay);..hi|
|00000e70| 64 65 70 65 6e 3b 0d 09 | 63 6c 6f 73 65 50 69 63 |depen;..|closePic|
|00000e80| 74 75 72 65 3b 0d 09 0d | 09 4e 65 77 52 65 63 6f |ture;...|.NewReco|
|00000e90| 72 64 50 69 63 74 75 72 | 65 3b 0d 09 0d 09 6d 69 |rdPictur|e;....mi|
|00000ea0| 6e 52 65 63 6f 72 64 3a | 3d 2b 69 6e 66 3b 0d 09 |nRecord:|=+inf;..|
|00000eb0| 6d 61 78 52 65 63 6f 72 | 64 3a 3d 2d 69 6e 66 3b |maxRecor|d:=-inf;|
|00000ec0| 0d 09 69 66 20 73 79 73 | 74 65 6d 2e 47 72 61 66 |..if sys|tem.Graf|
|00000ed0| 69 63 4d 6f 64 65 6c 3c | 3e 43 6f 6c 6f 72 51 75 |icModel<|>ColorQu|
|00000ee0| 69 63 6b 64 72 61 77 4d | 6f 64 65 6c 20 0d 09 54 |ickdrawM|odel ..T|
|00000ef0| 48 45 4e 20 66 61 74 61 | 6c 3b 0d 0d 09 49 46 20 |HEN fata|l;...IF |
|00000f00| 6d 61 73 74 65 72 20 54 | 48 45 4e 20 42 45 47 49 |master T|HEN BEGI|
|00000f10| 4e 0d 09 09 6e 65 77 28 | 6d 79 54 61 73 6b 47 65 |N...new(|myTaskGe|
|00000f20| 6e 65 72 61 74 6f 72 29 | 3b 0d 09 09 49 46 20 6d |nerator)|;...IF m|
|00000f30| 79 54 61 73 6b 47 65 6e | 65 72 61 74 6f 72 3c 3e |yTaskGen|erator<>|
|00000f40| 4e 49 4c 20 54 48 45 4e | 20 42 45 47 49 4e 0d 0d |NIL THEN| BEGIN..|
|00000f50| 09 09 09 4e 65 74 57 6f | 72 6b 53 63 68 65 64 75 |...NetWo|rkSchedu|
|00000f60| 6c 65 72 2e 69 6e 69 74 | 54 61 73 6b 47 65 6e 65 |ler.init|TaskGene|
|00000f70| 72 61 74 6f 72 28 6d 79 | 54 61 73 6b 47 65 6e 65 |rator(my|TaskGene|
|00000f80| 72 61 74 6f 72 29 3b 0d | 09 09 45 4e 44 3b 0d 0d |rator);.|..END;..|
|00000f90| 09 09 53 74 61 74 69 73 | 74 69 63 57 69 6e 64 6f |..Statis|ticWindo|
|00000fa0| 77 3a 3d 47 65 74 4e 65 | 77 57 69 6e 64 6f 77 28 |w:=GetNe|wWindow(|
|00000fb0| 31 32 39 2c 40 53 74 61 | 74 69 73 74 69 63 57 69 |129,@Sta|tisticWi|
|00000fc0| 6e 64 6f 77 52 65 63 2c | 50 6f 69 6e 74 65 72 28 |ndowRec,|Pointer(|
|00000fd0| 2d 31 29 29 3b 7b 73 68 | 6f 75 6c 64 20 67 6f 20 |-1));{sh|ould go |
|00000fe0| 74 6f 20 6f 70 65 6e 7d | 0d 09 09 69 6e 69 74 73 |to open}|...inits|
|00000ff0| 74 61 74 69 73 74 69 63 | 73 3b 0d 09 09 73 65 74 |tatistic|s;...set|
|00001000| 72 65 63 74 28 6c 6f 63 | 61 6c 68 72 65 63 74 2c |rect(loc|alhrect,|
|00001010| 30 2c 30 2c 63 68 73 69 | 7a 65 2c 63 76 73 69 7a |0,0,chsi|ze,cvsiz|
|00001020| 65 29 3b 6f 66 66 73 65 | 74 72 65 63 74 28 6c 6f |e);offse|trect(lo|
|00001030| 63 61 6c 68 72 65 63 74 | 2c 63 68 64 65 6c 74 61 |calhrect|,chdelta|
|00001040| 2c 63 76 64 65 6c 74 61 | 29 3b 0d 09 09 73 65 74 |,cvdelta|);...set|
|00001050| 72 65 63 74 28 74 6f 74 | 61 6c 68 72 65 63 74 2c |rect(tot|alhrect,|
|00001060| 30 2c 30 2c 63 68 73 69 | 7a 65 2c 63 76 73 69 7a |0,0,chsi|ze,cvsiz|
|00001070| 65 29 3b 6f 66 66 73 65 | 74 72 65 63 74 28 74 6f |e);offse|trect(to|
|00001080| 74 61 6c 68 72 65 63 74 | 2c 63 68 73 69 7a 65 2b |talhrect|,chsize+|
|00001090| 32 2a 63 68 64 65 6c 74 | 61 2c 63 76 64 65 6c 74 |2*chdelt|a,cvdelt|
|000010a0| 61 29 3b 0d 0d 09 09 73 | 65 74 72 65 63 74 28 6c |a);....s|etrect(l|
|000010b0| 6f 63 61 6c 73 72 65 63 | 74 2c 30 2c 30 2c 63 68 |ocalsrec|t,0,0,ch|
|000010c0| 73 69 7a 65 2c 63 76 74 | 73 69 7a 65 29 3b 6f 66 |size,cvt|size);of|
|000010d0| 66 73 65 74 72 65 63 74 | 28 6c 6f 63 61 6c 73 72 |fsetrect|(localsr|
|000010e0| 65 63 74 2c 63 68 64 65 | 6c 74 61 2c 63 76 73 69 |ect,chde|lta,cvsi|
|000010f0| 7a 65 2b 32 2a 63 76 64 | 65 6c 74 61 29 3b 0d 09 |ze+2*cvd|elta);..|
|00001100| 09 73 65 74 72 65 63 74 | 28 74 6f 74 61 6c 73 72 |.setrect|(totalsr|
|00001110| 65 63 74 2c 30 2c 30 2c | 63 68 73 69 7a 65 2c 63 |ect,0,0,|chsize,c|
|00001120| 76 74 73 69 7a 65 29 3b | 6f 66 66 73 65 74 72 65 |vtsize);|offsetre|
|00001130| 63 74 28 74 6f 74 61 6c | 73 72 65 63 74 2c 63 68 |ct(total|srect,ch|
|00001140| 73 69 7a 65 2b 32 2a 63 | 68 64 65 6c 74 61 2c 63 |size+2*c|hdelta,c|
|00001150| 76 73 69 7a 65 2b 32 2a | 63 76 64 65 6c 74 61 29 |vsize+2*|cvdelta)|
|00001160| 3b 0d 0d 09 09 73 65 74 | 72 65 63 74 28 70 63 6f |;....set|rect(pco|
|00001170| 6d 70 72 65 63 74 2c 30 | 2c 30 2c 63 68 73 69 7a |mprect,0|,0,chsiz|
|00001180| 65 2c 63 76 73 69 7a 65 | 29 3b 6f 66 66 73 65 74 |e,cvsize|);offset|
|00001190| 72 65 63 74 28 70 63 6f | 6d 70 72 65 63 74 2c 63 |rect(pco|mprect,c|
|000011a0| 68 64 65 6c 74 61 2c 0d | 09 09 63 76 73 69 7a 65 |hdelta,.|..cvsize|
|000011b0| 2b 33 2a 63 76 64 65 6c | 74 61 2b 63 76 74 73 69 |+3*cvdel|ta+cvtsi|
|000011c0| 7a 65 29 3b 0d 09 09 73 | 65 74 72 65 63 74 28 71 |ze);...s|etrect(q|
|000011d0| 63 6f 6d 70 72 65 63 74 | 2c 30 2c 30 2c 63 68 73 |comprect|,0,0,chs|
|000011e0| 69 7a 65 2c 63 76 73 69 | 7a 65 29 3b 6f 66 66 73 |ize,cvsi|ze);offs|
|000011f0| 65 74 72 65 63 74 28 71 | 63 6f 6d 70 72 65 63 74 |etrect(q|comprect|
|00001200| 2c 63 68 73 69 7a 65 2b | 32 2a 63 68 64 65 6c 74 |,chsize+|2*chdelt|
|00001210| 61 2c 0d 09 09 63 76 73 | 69 7a 65 2b 33 2a 63 76 |a,...cvs|ize+3*cv|
|00001220| 64 65 6c 74 61 2b 63 76 | 74 73 69 7a 65 29 3b 0d |delta+cv|tsize);.|
|00001230| 09 45 4e 44 3b 0d 0d 09 | 77 69 74 68 20 67 4d 73 |.END;...|with gMs|
|00001240| 67 48 65 61 64 65 72 20 | 64 6f 20 62 65 67 69 6e |gHeader |do begin|
|00001250| 0d 09 09 74 72 61 63 65 | 69 6e 66 6f 3a 3d 30 3b |...trace|info:=0;|
|00001260| 0d 09 09 76 65 72 73 69 | 6f 6e 3a 3d 63 4d 79 4d |...versi|on:=cMyM|
|00001270| 73 67 48 65 61 64 65 72 | 56 65 72 73 69 6f 6e 3b |sgHeader|Version;|
|00001280| 0d 09 09 61 63 74 69 6f | 6e 3a 3d 61 4e 6f 6f 70 |...actio|n:=aNoop|
|00001290| 3b 0d 09 09 43 6f 6e 74 | 65 6e 74 73 54 6f 6b 65 |;...Cont|entsToke|
|000012a0| 6e 3a 3d 6c 6f 6e 67 69 | 6e 74 28 27 4e 4f 4e 45 |n:=longi|nt('NONE|
|000012b0| 27 29 3b 0d 09 09 44 69 | 73 74 72 69 62 75 74 69 |');...Di|stributi|
|000012c0| 6f 6e 54 6f 6b 65 6e 3a | 3d 6c 6f 6e 67 69 6e 74 |onToken:|=longint|
|000012d0| 28 63 44 65 66 61 75 6c | 74 44 69 73 74 72 69 62 |(cDefaul|tDistrib|
|000012e0| 75 74 69 6f 6e 29 3b 0d | 09 09 44 69 73 70 6c 61 |ution);.|..Displa|
|000012f0| 79 54 6f 6b 65 6e 3a 3d | 6c 6f 6e 67 69 6e 74 28 |yToken:=|longint(|
|00001300| 63 44 65 66 61 75 6c 74 | 44 69 73 70 6c 61 79 29 |cDefault|Display)|
|00001310| 3b 0d 09 09 53 61 6d 70 | 6c 65 53 69 7a 65 3a 3d |;...Samp|leSize:=|
|00001320| 35 30 3b 0d 09 65 6e 64 | 3b 0d 45 4e 44 3b 0d 0d |50;..end|;.END;..|
|00001330| 7b 41 70 70 6c 69 63 61 | 74 69 6f 6e 20 65 71 75 |{Applica|tion equ|
|00001340| 69 76 61 6c 65 6e 74 20 | 6f 66 20 73 79 73 74 65 |ivalent |of syste|
|00001350| 6d 20 54 61 73 6b 3a 20 | 74 68 69 73 20 69 73 20 |m Task: |this is |
|00001360| 79 6f 75 72 20 6d 61 69 | 6e 20 70 72 6f 67 72 61 |your mai|n progra|
|00001370| 6d 7d 0d 50 52 4f 43 45 | 44 55 52 45 20 4d 79 54 |m}.PROCE|DURE MyT|
|00001380| 61 73 6b 28 70 68 61 73 | 65 20 3a 20 42 61 63 6b |ask(phas|e : Back|
|00001390| 50 68 61 73 65 29 3b 0d | 63 6f 6e 73 74 20 0d 09 |Phase);.|const ..|
|000013a0| 63 46 6f 72 65 47 72 6f | 75 6e 64 53 6c 65 65 70 |cForeGro|undSleep|
|000013b0| 3d 30 3b 0d 09 63 42 61 | 63 6b 47 72 6f 75 6e 64 |=0;..cBa|ckGround|
|000013c0| 53 6c 65 65 70 3d 31 30 | 3b 0d 42 45 47 49 4e 0d |Sleep=10|;.BEGIN.|
|000013d0| 09 7b 64 6f 20 79 6f 75 | 72 20 6a 6f 62 20 68 65 |.{do you|r job he|
|000013e0| 72 65 7d 20 0d 09 43 41 | 53 45 20 70 68 61 73 65 |re} ..CA|SE phase|
|000013f0| 20 4f 46 0d 09 09 42 61 | 63 6b 42 65 67 69 6e 20 | OF...Ba|ckBegin |
|00001400| 3a 20 20 62 65 67 69 6e | 7b 77 65 20 61 72 65 20 |: begin|{we are |
|00001410| 67 6f 69 6e 67 20 74 6f | 20 74 68 65 20 62 61 63 |going to| the bac|
|00001420| 6b 67 72 6f 75 6e 64 7d | 0d 09 09 09 7b 70 72 6f |kground}|....{pro|
|00001430| 67 72 65 73 73 72 65 70 | 6f 72 74 28 31 2c 27 54 |gressrep|ort(1,'T|
|00001440| 65 6d 70 6c 61 74 65 20 | 69 73 20 69 6e 20 62 61 |emplate |is in ba|
|00001450| 63 6b 67 72 6f 75 6e 64 | 27 29 7d 3b 0d 09 09 09 |ckground|')};....|
|00001460| 69 66 20 67 57 61 69 74 | 4e 65 78 74 45 76 65 6e |if gWait|NextEven|
|00001470| 74 53 6c 65 65 70 3e 3d | 63 46 6f 72 65 47 72 6f |tSleep>=|cForeGro|
|00001480| 75 6e 64 53 6c 65 65 70 | 20 74 68 65 6e 20 67 57 |undSleep| then gW|
|00001490| 61 69 74 4e 65 78 74 45 | 76 65 6e 74 53 6c 65 65 |aitNextE|ventSlee|
|000014a0| 70 3a 3d 63 46 6f 72 65 | 47 72 6f 75 6e 64 53 6c |p:=cFore|GroundSl|
|000014b0| 65 65 70 3b 0d 09 09 65 | 6e 64 3b 0d 09 09 42 61 |eep;...e|nd;...Ba|
|000014c0| 63 6b 43 6f 6e 74 69 6e | 75 65 20 3a 20 7b 77 65 |ckContin|ue : {we|
|000014d0| 20 61 72 65 20 63 61 6c | 6c 65 64 20 61 67 61 69 | are cal|led agai|
|000014e0| 6e 7d 0d 09 09 62 65 67 | 69 6e 20 0d 09 09 09 69 |n}...beg|in ....i|
|000014f0| 66 20 67 49 6e 42 61 63 | 6b 67 72 6f 75 6e 64 20 |f gInBac|kground |
|00001500| 74 68 65 6e 20 7b 69 66 | 20 79 6f 75 20 77 61 6e |then {if| you wan|
|00001510| 74 20 73 70 65 63 69 61 | 6c 20 62 61 63 6b 67 72 |t specia|l backgr|
|00001520| 6f 75 6e 64 20 74 61 73 | 6b 73 20 64 6f 6e 65 7d |ound tas|ks done}|
|00001530| 0d 09 09 09 62 65 67 69 | 6e 20 69 66 20 67 57 61 |....begi|n if gWa|
|00001540| 69 74 4e 65 78 74 45 76 | 65 6e 74 53 6c 65 65 70 |itNextEv|entSleep|
|00001550| 3e 63 42 61 63 6b 47 72 | 6f 75 6e 64 53 6c 65 65 |>cBackGr|oundSlee|
|00001560| 70 20 74 68 65 6e 20 67 | 57 61 69 74 4e 65 78 74 |p then g|WaitNext|
|00001570| 45 76 65 6e 74 53 6c 65 | 65 70 3a 3d 63 42 61 63 |EventSle|ep:=cBac|
|00001580| 6b 47 72 6f 75 6e 64 53 | 6c 65 65 70 3b 0d 09 09 |kGroundS|leep;...|
|00001590| 09 09 69 66 20 6d 61 73 | 74 65 72 20 74 68 65 6e |..if mas|ter then|
|000015a0| 20 44 6f 4c 6f 63 61 6c | 54 61 73 6b 3b 0d 09 09 | DoLocal|Task;...|
|000015b0| 09 09 7b 69 6e 76 65 72 | 74 72 65 63 74 28 74 68 |..{inver|trect(th|
|000015c0| 65 50 6f 72 74 5e 2e 70 | 6f 72 74 72 65 63 74 29 |ePort^.p|ortrect)|
|000015d0| 09 20 7d 7b 20 64 6f 20 | 69 74 20 68 65 72 65 2e |. }{ do |it here.|
|000015e0| 7d 0d 09 09 09 09 7b 20 | 74 68 69 73 20 69 73 20 |}.....{ |this is |
|000015f0| 6a 75 73 74 20 61 20 71 | 75 69 63 6b 26 64 69 72 |just a q|uick&dir|
|00001600| 74 79 20 65 78 61 6d 70 | 6c 65 20 7d 0d 09 09 09 |ty examp|le }....|
|00001610| 65 6e 64 20 65 6c 73 65 | 20 62 65 67 69 6e 0d 09 |end else| begin..|
|00001620| 09 09 09 69 66 20 6d 61 | 73 74 65 72 20 74 68 65 |...if ma|ster the|
|00001630| 6e 20 44 6f 4c 6f 63 61 | 6c 54 61 73 6b 3b 0d 09 |n DoLoca|lTask;..|
|00001640| 09 09 09 69 66 20 67 57 | 61 69 74 4e 65 78 74 45 |...if gW|aitNextE|
|00001650| 76 65 6e 74 53 6c 65 65 | 70 3e 63 46 6f 72 65 47 |ventSlee|p>cForeG|
|00001660| 72 6f 75 6e 64 53 6c 65 | 65 70 20 74 68 65 6e 20 |roundSle|ep then |
|00001670| 67 57 61 69 74 4e 65 78 | 74 45 76 65 6e 74 53 6c |gWaitNex|tEventSl|
|00001680| 65 65 70 3a 3d 63 46 6f | 72 65 47 72 6f 75 6e 64 |eep:=cFo|reGround|
|00001690| 53 6c 65 65 70 3b 0d 09 | 09 09 65 6e 64 3b 0d 09 |Sleep;..|..end;..|
|000016a0| 09 65 6e 64 3b 0d 09 09 | 42 61 63 6b 45 6e 64 20 |.end;...|BackEnd |
|000016b0| 3a 20 7b 77 65 20 61 72 | 65 20 63 6f 6d 69 6e 67 |: {we ar|e coming|
|000016c0| 20 66 72 6f 6d 20 62 61 | 63 6b 67 72 6f 75 6e 64 | from ba|ckground|
|000016d0| 7d 0d 09 09 62 65 67 69 | 6e 0d 09 09 09 7b 68 69 |}...begi|n....{hi|
|000016e0| 64 65 70 72 6f 67 72 65 | 73 73 3b 7d 0d 09 09 09 |deprogre|ss;}....|
|000016f0| 7b 20 74 68 69 73 20 77 | 61 73 20 6a 75 73 74 20 |{ this w|as just |
|00001700| 61 20 71 75 69 63 6b 26 | 64 69 72 74 79 20 65 78 |a quick&|dirty ex|
|00001710| 61 6d 70 6c 65 2c 20 6c | 65 74 27 73 20 63 6c 65 |ample, l|et's cle|
|00001720| 61 6e 20 75 70 7d 0d 09 | 09 09 69 66 20 67 57 61 |an up}..|..if gWa|
|00001730| 69 74 4e 65 78 74 45 76 | 65 6e 74 53 6c 65 65 70 |itNextEv|entSleep|
|00001740| 3e 63 46 6f 72 65 47 72 | 6f 75 6e 64 53 6c 65 65 |>cForeGr|oundSlee|
|00001750| 70 20 74 68 65 6e 20 67 | 57 61 69 74 4e 65 78 74 |p then g|WaitNext|
|00001760| 45 76 65 6e 74 53 6c 65 | 65 70 3a 3d 63 46 6f 72 |EventSle|ep:=cFor|
|00001770| 65 47 72 6f 75 6e 64 53 | 6c 65 65 70 3b 0d 09 09 |eGroundS|leep;...|
|00001780| 09 65 72 61 73 65 72 65 | 63 74 28 74 68 65 50 6f |.erasere|ct(thePo|
|00001790| 72 74 5e 2e 70 6f 72 74 | 72 65 63 74 29 3b 0d 09 |rt^.port|rect);..|
|000017a0| 09 09 69 6e 76 61 6c 72 | 65 63 74 28 74 68 65 50 |..invalr|ect(theP|
|000017b0| 6f 72 74 5e 2e 70 6f 72 | 74 62 69 74 73 2e 62 6f |ort^.por|tbits.bo|
|000017c0| 75 6e 64 73 29 3b 0d 09 | 09 65 6e 64 3b 0d 09 09 |unds);..|.end;...|
|000017d0| 4f 54 48 45 52 57 49 53 | 45 20 09 09 7b 73 68 6f |OTHERWIS|E ..{sho|
|000017e0| 75 6c 64 20 6e 6f 74 20 | 6f 63 63 75 72 7d 0d 09 |uld not |occur}..|
|000017f0| 45 4e 44 3b 0d 09 69 66 | 20 54 69 63 6b 43 6f 75 |END;..if| TickCou|
|00001800| 6e 74 3e 67 4e 65 78 74 | 4e 65 74 52 65 66 72 65 |nt>gNext|NetRefre|
|00001810| 73 68 20 74 68 65 6e 20 | 62 65 67 69 6e 0d 09 09 |sh then |begin...|
|00001820| 44 72 61 77 53 74 61 74 | 69 73 74 69 63 57 69 6e |DrawStat|isticWin|
|00001830| 64 6f 77 3b 0d 09 09 67 | 4e 65 78 74 4e 65 74 52 |dow;...g|NextNetR|
|00001840| 65 66 72 65 73 68 3a 3d | 54 69 63 6b 43 6f 75 6e |efresh:=|TickCoun|
|00001850| 74 2b 63 4e 65 74 52 65 | 66 72 65 73 68 44 65 6c |t+cNetRe|freshDel|
|00001860| 74 61 3b 0d 09 65 6e 64 | 3b 0d 09 69 66 20 6d 61 |ta;..end|;..if ma|
|00001870| 73 74 65 72 20 74 68 65 | 6e 20 67 54 61 73 6b 53 |ster the|n gTaskS|
|00001880| 74 61 74 65 20 3a 3d 20 | 54 61 73 6b 4f 6b 20 65 |tate := |TaskOk e|
|00001890| 6c 73 65 20 67 54 61 73 | 6b 53 74 61 74 65 3a 3d |lse gTas|kState:=|
|000018a0| 54 61 73 6b 49 64 6c 65 | 3b 20 7b 69 66 20 61 6c |TaskIdle|; {if al|
|000018b0| 6c 20 69 73 20 6f 6b 7d | 0d 45 4e 44 3b 0d 0d 50 |l is ok}|.END;..P|
|000018c0| 52 4f 43 45 44 55 52 45 | 20 4d 79 43 6c 65 61 6e |ROCEDURE| MyClean|
|000018d0| 55 70 3b 0d 76 61 72 20 | 6d 73 67 3a 6d 73 67 50 |Up;.var |msg:msgP|
|000018e0| 74 72 3b 0d 09 6d 65 2c | 44 65 73 74 3a 6d 73 67 |tr;..me,|Dest:msg|
|000018f0| 41 64 64 72 3b 0d 42 45 | 47 49 4e 0d 09 7b 63 6c |Addr;.BE|GIN..{cl|
|00001900| 65 61 6e 20 75 70 20 61 | 6e 79 20 6d 65 73 73 20 |ean up a|ny mess |
|00001910| 79 6f 75 20 68 61 76 65 | 20 64 6f 6e 65 20 68 65 |you have| done he|
|00001920| 72 65 2e 20 53 61 76 65 | 20 79 6f 75 72 20 72 65 |re. Save| your re|
|00001930| 73 75 6c 74 73 7d 0d 09 | 69 66 20 67 50 72 6f 74 |sults}..|if gProt|
|00001940| 6f 63 6f 6c 4f 6e 20 74 | 68 65 6e 20 09 63 6c 6f |ocolOn t|hen .clo|
|00001950| 73 65 28 4f 75 74 46 69 | 6c 65 29 3b 0d 09 0d 09 |se(OutFi|le);....|
|00001960| 7b 73 65 6e 64 20 61 20 | 67 6f 6f 64 62 79 65 20 |{send a |goodbye |
|00001970| 6d 65 73 73 61 67 65 20 | 76 69 61 20 62 72 6f 61 |message |via broa|
|00001980| 64 63 61 73 74 20 74 6f | 20 72 65 6c 65 61 73 65 |dcast to| release|
|00001990| 20 61 6c 6c 20 70 61 72 | 74 6e 65 72 73 7d 0d 09 | all par|tners}..|
|000019a0| 70 72 65 70 61 72 65 6d | 65 73 73 61 67 65 48 65 |preparem|essageHe|
|000019b0| 61 64 65 72 28 67 4d 73 | 67 48 65 61 64 65 72 2c |ader(gMs|gHeader,|
|000019c0| 61 44 6f 6e 65 29 3b 0d | 09 6d 65 3a 3d 4e 65 74 |aDone);.|.me:=Net|
|000019d0| 57 6f 72 6b 53 63 68 65 | 64 75 6c 65 72 2e 4d 79 |WorkSche|duler.My|
|000019e0| 53 65 6c 66 3b 0d 09 44 | 65 73 74 2e 70 3a 3d 4e |Self;..D|est.p:=N|
|000019f0| 65 74 57 6f 72 6b 53 63 | 68 65 64 75 6c 65 72 2e |etWorkSc|heduler.|
|00001a00| 4d 79 53 65 6c 66 2e 70 | 3b 0d 09 44 65 73 74 2e |MySelf.p|;..Dest.|
|00001a10| 61 20 3a 3d 20 2d 31 3b | 20 7b 20 62 72 6f 61 64 |a := -1;| { broad|
|00001a20| 63 61 73 74 20 7d 0d 09 | 69 66 20 6d 61 73 74 65 |cast }..|if maste|
|00001a30| 72 20 74 68 65 6e 20 69 | 66 20 70 6f 73 74 6d 73 |r then i|f postms|
|00001a40| 67 28 6d 73 67 2c 6e 69 | 6c 2c 63 4d 73 67 4e 41 |g(msg,ni|l,cMsgNA|
|00001a50| 74 74 65 6e 74 69 6f 6e | 2b 63 4d 75 73 74 42 65 |ttention|+cMustBe|
|00001a60| 4c 61 75 6e 63 68 65 64 | 2c 0d 09 4e 65 74 57 6f |Launched|,..NetWo|
|00001a70| 72 6b 53 63 68 65 64 75 | 6c 65 72 2e 54 61 73 6b |rkSchedu|ler.Task|
|00001a80| 47 65 6e 65 72 61 74 6f | 72 2e 43 6f 6e 74 65 78 |Generato|r.Contex|
|00001a90| 74 53 74 61 6d 70 2c 0d | 09 44 65 73 74 2c 6d 65 |tStamp,.|.Dest,me|
|00001aa0| 2c 0d 09 40 67 4d 73 67 | 48 65 61 64 65 72 2c 73 |,..@gMsg|Header,s|
|00001ab0| 69 7a 65 6f 66 28 67 4d | 73 67 48 65 61 64 65 72 |izeof(gM|sgHeader|
|00001ac0| 29 2c 6e 69 6c 2c 30 29 | 3c 3e 6e 6f 45 72 72 20 |),nil,0)|<>noErr |
|00001ad0| 74 68 65 6e 3b 0d 09 69 | 66 20 4e 65 74 57 6f 72 |then;..i|f NetWor|
|00001ae0| 6b 53 63 68 65 64 75 6c | 65 72 3c 3e 6e 69 6c 20 |kSchedul|er<>nil |
|00001af0| 74 68 65 6e 20 4e 65 74 | 57 6f 72 6b 53 63 68 65 |then Net|WorkSche|
|00001b00| 64 75 6c 65 72 2e 66 72 | 65 65 3b 0d 0d 45 4e 44 |duler.fr|ee;..END|
|00001b10| 3b 0d 0d 7b 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |;..{----|--------|
|00001b20| 2d 2d 2d 2d 2d 2d 2d 2d | 20 72 6f 75 74 69 6e 65 |--------| routine|
|00001b30| 73 20 6f 6e 20 72 65 71 | 75 65 73 74 20 20 20 20 |s on req|uest |
|00001b40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001b50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 7d 0d 0d 50 52 4f 43 |--------|-}..PROC|
|00001b60| 45 44 55 52 45 20 64 6f | 6f 70 65 6e 3b 0d 43 4f |EDURE do|open;.CO|
|00001b70| 4e 53 54 0d 09 68 65 69 | 67 68 74 20 3d 20 31 30 |NST..hei|ght = 10|
|00001b80| 30 3b 7b 6a 75 73 74 20 | 66 6f 72 20 65 78 61 6d |0;{just |for exam|
|00001b90| 70 6c 65 7d 0d 09 77 69 | 64 74 68 20 3d 20 33 30 |ple}..wi|dth = 30|
|00001ba0| 30 3b 0d 56 41 52 0d 09 | 61 6e 79 53 74 72 2c 73 |0;.VAR..|anyStr,s|
|00001bb0| 20 3a 20 53 74 72 32 35 | 35 3b 0d 09 61 6e 79 69 | : Str25|5;..anyi|
|00001bc0| 6e 64 65 78 20 3a 20 69 | 6e 74 65 67 65 72 3b 0d |ndex : i|nteger;.|
|00001bd0| 09 61 6e 79 46 61 6b 74 | 6f 72 2c 20 61 6e 79 53 |.anyFakt|or, anyS|
|00001be0| 63 61 6c 65 20 3a 20 72 | 65 61 6c 3b 0d 09 61 6e |cale : r|eal;..an|
|00001bf0| 79 48 61 6e 64 6c 65 20 | 3a 20 50 69 63 48 61 6e |yHandle |: PicHan|
|00001c00| 64 6c 65 3b 0d 09 76 61 | 6c 3a 65 78 74 65 6e 64 |dle;..va|l:extend|
|00001c10| 65 64 3b 0d 09 6d 79 74 | 69 6d 65 3a 6c 6f 6e 67 |ed;..myt|ime:long|
|00001c20| 69 6e 74 3b 71 3a 65 78 | 74 65 6e 64 65 64 3b 0d |int;q:ex|tended;.|
|00001c30| 42 45 47 49 4e 0d 09 43 | 41 53 45 20 69 74 73 43 |BEGIN..C|ASE itsC|
|00001c40| 6d 64 4e 75 6d 62 65 72 | 20 4f 46 0d 09 09 63 6e |mdNumber| OF...cn|
|00001c50| 65 77 20 3a 20 0d 09 09 | 42 45 47 49 4e 0d 09 09 |ew : ...|BEGIN...|
|00001c60| 09 7b 73 61 76 65 20 6f | 6c 64 20 72 65 73 75 6c |.{save o|ld resul|
|00001c70| 74 73 7d 0d 09 09 09 69 | 66 20 52 65 61 64 44 61 |ts}....i|f ReadDa|
|00001c80| 74 65 54 69 6d 65 28 6d | 79 54 69 6d 65 29 3d 4e |teTime(m|yTime)=N|
|00001c90| 6f 45 72 72 20 74 68 65 | 6e 20 0d 09 09 09 62 65 |oErr the|n ....be|
|00001ca0| 67 69 6e 0d 09 09 09 09 | 71 3a 3d 28 6d 79 74 69 |gin.....|q:=(myti|
|00001cb0| 6d 65 2d 67 6f 6c 64 54 | 69 6d 65 29 3b 0d 09 09 |me-goldT|ime);...|
|00001cc0| 09 09 4e 75 6d 54 6f 53 | 74 72 69 6e 67 28 72 6f |..NumToS|tring(ro|
|00001cd0| 75 6e 64 28 71 29 2c 73 | 29 3b 0d 09 09 09 09 6e |und(q),s|);.....n|
|00001ce0| 75 6d 74 6f 73 74 72 69 | 6e 67 28 67 6e 72 52 65 |umtostri|ng(gnrRe|
|00001cf0| 73 75 6c 74 73 2c 67 73 | 4f 6c 64 52 65 73 75 6c |sults,gs|OldResul|
|00001d00| 74 73 29 3b 0d 09 09 09 | 09 0d 09 09 09 09 67 73 |ts);....|......gs|
|00001d10| 4f 6c 64 52 65 73 75 6c | 74 73 3a 3d 63 6f 6e 63 |OldResul|ts:=conc|
|00001d20| 61 74 28 27 5a 65 69 74 | 3a 20 27 2c 73 2c 27 20 |at('Zeit|: ',s,' |
|00001d30| 73 20 23 3a 20 27 2c 67 | 73 4f 6c 64 52 65 73 75 |s #: ',g|sOldResu|
|00001d40| 6c 74 73 29 3b 0d 09 09 | 09 65 6e 64 3b 0d 0d 09 |lts);...|.end;...|
|00001d50| 09 09 6e 65 78 74 54 69 | 63 6b 73 3a 3d 74 69 63 |..nextTi|cks:=tic|
|00001d60| 6b 43 6f 75 6e 74 2b 54 | 69 63 6b 73 44 65 6c 74 |kCount+T|icksDelt|
|00001d70| 61 3b 0d 0d 09 09 09 72 | 65 70 65 61 74 20 75 6e |a;.....r|epeat un|
|00001d80| 74 69 6c 20 52 65 61 64 | 44 61 74 65 54 69 6d 65 |til Read|DateTime|
|00001d90| 28 6f 6c 64 54 69 6d 65 | 29 3d 6e 6f 45 72 72 3b |(oldTime|)=noErr;|
|00001da0| 0d 0d 09 09 09 67 6e 72 | 52 65 73 75 6c 74 73 3a |.....gnr|Results:|
|00001db0| 3d 30 3b 0d 09 09 09 6e | 72 52 65 73 75 6c 74 73 |=0;....n|rResults|
|00001dc0| 3a 3d 30 3b 0d 0d 09 09 | 09 7b 6a 75 73 74 20 61 |:=0;....|.{just a|
|00001dd0| 6e 20 65 78 61 6d 70 6c | 65 2d 20 6d 61 6b 65 20 |n exampl|e- make |
|00001de0| 61 20 73 61 6d 70 6c 65 | 20 77 69 6e 64 6f 77 7d |a sample| window}|
|00001df0| 0d 0d 09 09 09 61 6e 79 | 53 74 72 20 3a 3d 20 28 |.....any|Str := (|
|00001e00| 27 4c 6f 63 61 6c 20 53 | 61 6d 70 6c 65 27 29 3b |'Local S|ample');|
|00001e10| 0d 09 09 09 69 66 20 73 | 79 73 74 65 6d 2e 57 69 |....if s|ystem.Wi|
|00001e20| 6e 64 6f 77 43 6f 75 6e | 74 20 3d 30 20 74 68 65 |ndowCoun|t =0 the|
|00001e30| 6e 0d 09 09 09 7b 20 74 | 77 6f 20 74 79 70 65 73 |n....{ t|wo types|
|00001e40| 2c 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 3a 20 77 |, for ex|ample: w|
|00001e50| 69 74 68 20 6e 6f 20 47 | 72 6f 77 2c 20 6e 6f 20 |ith no G|row, no |
|00001e60| 47 6f 41 77 61 79 7d 0d | 09 09 09 4d 61 6b 65 41 |GoAway}.|...MakeA|
|00001e70| 57 69 6e 64 6f 77 28 61 | 6e 79 53 74 72 2c 20 77 |Window(a|nyStr, w|
|00001e80| 69 64 74 68 2c 20 68 65 | 69 67 68 74 2c 20 2d 6e |idth, he|ight, -n|
|00001e90| 6f 47 72 6f 77 44 6f 63 | 50 72 6f 63 29 3b 0d 0d |oGrowDoc|Proc);..|
|00001ea0| 09 09 09 7b 64 65 66 69 | 6e 65 20 79 6f 75 72 20 |...{defi|ne your |
|00001eb0| 6f 77 6e 20 72 65 61 6c | 20 32 64 20 63 6f 6f 72 |own real| 2d coor|
|00001ec0| 64 69 6e 61 74 65 73 7d | 0d 09 09 09 73 65 74 63 |dinates}|....setc|
|00001ed0| 6f 6f 72 64 28 2d 73 79 | 73 74 65 6d 2e 57 69 6e |oord(-sy|stem.Win|
|00001ee0| 64 6f 77 43 6f 75 6e 74 | 2c 20 31 2c 20 73 79 73 |dowCount|, 1, sys|
|00001ef0| 74 65 6d 2e 57 69 6e 64 | 6f 77 43 6f 75 6e 74 2c |tem.Wind|owCount,|
|00001f00| 20 2d 31 29 3b 0d 09 09 | 09 0d 09 09 09 73 49 6e | -1);...|.....sIn|
|00001f10| 69 74 3b 0d 09 09 45 4e | 44 3b 0d 09 09 63 4f 70 |it;...EN|D;...cOp|
|00001f20| 65 6e 20 3a 20 0d 09 09 | 3b 0d 09 09 4f 54 48 45 |en : ...|;...OTHE|
|00001f30| 52 57 49 53 45 20 7b 73 | 68 6f 75 6c 64 20 6e 6f |RWISE {s|hould no|
|00001f40| 74 20 6f 63 63 75 72 7d | 0d 09 45 4e 44 3b 0d 45 |t occur}|..END;.E|
|00001f50| 4e 44 3b 0d 0d 7b 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ND;..{==|========|
|00001f60| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001f70| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001f80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001f90| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001fa0| 3d 3d 3d 7d 0d 0d 7b 74 | 61 6b 65 20 61 20 70 69 |===}..{t|ake a pi|
|00001fb0| 63 74 75 72 65 20 61 73 | 6b 20 66 6f 72 20 61 20 |cture as|k for a |
|00001fc0| 66 69 6c 65 20 6e 61 6d | 65 2c 20 61 6e 64 20 73 |file nam|e, and s|
|00001fd0| 74 6f 72 65 20 74 68 65 | 20 70 69 63 74 75 72 65 |tore the| picture|
|00001fe0| 20 69 6e 20 66 69 6c 65 | 2e 20 46 61 6b 65 20 4d | in file|. Fake M|
|00001ff0| 61 63 44 72 61 77 20 66 | 69 6c 65 7d 0d 0d 70 72 |acDraw f|ile}..pr|
|00002000| 6f 63 65 64 75 72 65 20 | 73 61 76 65 61 73 28 54 |ocedure |saveas(T|
|00002010| 68 65 50 69 63 3a 20 50 | 69 63 48 61 6e 64 6c 65 |hePic: P|icHandle|
|00002020| 29 3b 0d 74 79 70 65 0d | 09 54 4d 44 48 64 72 20 |);.type.|.TMDHdr |
|00002030| 3d 20 72 65 63 6f 72 64 | 20 7b 50 49 43 54 20 31 |= record| {PICT 1|
|00002040| 20 68 65 61 64 65 72 7d | 0d 09 09 66 74 79 70 65 | header}|...ftype|
|00002050| 3a 20 4f 53 54 79 70 65 | 3b 0d 09 09 68 64 72 69 |: OSType|;...hdri|
|00002060| 64 3a 20 69 6e 74 65 67 | 65 72 3b 0d 09 09 76 65 |d: integ|er;...ve|
|00002070| 72 73 69 6f 6e 3a 20 69 | 6e 74 65 67 65 72 3b 0d |rsion: i|nteger;.|
|00002080| 09 09 70 72 52 65 63 3a | 20 61 72 72 61 79 5b 31 |..prRec:| array[1|
|00002090| 2e 2e 36 30 5d 20 6f 66 | 20 69 6e 74 65 67 65 72 |..60] of| integer|
|000020a0| 3b 0d 09 09 78 6f 72 69 | 67 69 6e 3a 20 46 69 78 |;...xori|gin: Fix|
|000020b0| 65 64 3b 0d 09 09 79 6f | 72 69 67 69 6e 3a 20 70 |ed;...yo|rigin: p|
|000020c0| 6f 69 6e 74 3b 0d 09 09 | 78 73 63 61 6c 65 3a 20 |oint;...|xscale: |
|000020d0| 70 6f 69 6e 74 3b 0d 09 | 09 79 73 63 61 6c 65 3a |point;..|.yscale:|
|000020e0| 20 70 6f 69 6e 74 3b 0d | 09 09 61 74 72 73 74 61 | point;.|..atrsta|
|000020f0| 74 65 3a 20 61 72 72 61 | 79 5b 31 2e 2e 33 31 5d |te: arra|y[1..31]|
|00002100| 20 6f 66 20 69 6e 74 65 | 67 65 72 3b 0d 09 09 6c | of inte|ger;...l|
|00002110| 63 6e 74 3a 20 69 6e 74 | 65 67 65 72 3b 0d 09 09 |cnt: int|eger;...|
|00002120| 6c 74 6f 74 3a 20 49 6e | 74 65 67 65 72 3b 0d 09 |ltot: In|teger;..|
|00002130| 09 6c 73 69 7a 3a 20 6c | 6f 6e 67 69 6e 74 3b 0d |.lsiz: l|ongint;.|
|00002140| 09 09 6c 72 32 64 3a 20 | 72 65 63 74 3b 0d 09 09 |..lr2d: |rect;...|
|00002150| 66 69 6c 6c 65 72 31 3a | 20 61 72 72 61 79 5b 31 |filler1:| array[1|
|00002160| 2e 2e 31 34 31 5d 20 6f | 66 20 69 6e 74 65 67 65 |..141] o|f intege|
|00002170| 72 0d 09 65 6e 64 3b 0d | 76 61 72 0d 09 68 65 61 |r..end;.|var..hea|
|00002180| 64 65 72 3a 20 54 4d 44 | 48 64 72 3b 0d 09 74 65 |der: TMD|Hdr;..te|
|00002190| 6d 70 52 65 70 6c 79 3a | 20 53 46 52 65 70 6c 79 |mpReply:| SFReply|
|000021a0| 3b 0d 09 48 65 6c 70 66 | 69 3a 20 54 46 69 6c 65 |;..Helpf|i: TFile|
|000021b0| 69 6e 66 6f 3b 0d 0d 09 | 74 65 6d 70 65 72 72 3a |info;...|temperr:|
|000021c0| 20 6f 73 65 72 72 3b 0d | 09 74 65 6d 70 72 65 66 | oserr;.|.tempref|
|000021d0| 3a 20 69 6e 74 65 67 65 | 72 3b 0d 09 50 72 6f 70 |: intege|r;..Prop|
|000021e0| 6f 73 61 6c 3a 20 73 74 | 72 32 35 35 3b 0d 09 50 |osal: st|r255;..P|
|000021f0| 3a 20 70 74 72 3b 0d 09 | 63 6f 75 6e 74 3a 20 6c |: ptr;..|count: l|
|00002200| 6f 6e 67 69 6e 74 3b 0d | 09 72 3a 20 72 65 63 74 |ongint;.|.r: rect|
|00002210| 3b 0d 62 65 67 69 6e 0d | 0d 09 6e 75 6d 74 6f 73 |;.begin.|..numtos|
|00002220| 74 72 69 6e 67 28 74 69 | 63 6b 63 6f 75 6e 74 2c |tring(ti|ckcount,|
|00002230| 20 70 72 6f 70 6f 73 61 | 6c 29 3b 0d 09 70 72 6f | proposa|l);..pro|
|00002240| 70 6f 73 61 6c 20 3a 3d | 20 63 6f 6e 63 61 74 28 |posal :=| concat(|
|00002250| 20 27 54 65 6d 70 6c 61 | 74 65 2e 27 2c 20 70 72 | 'Templa|te.', pr|
|00002260| 6f 70 6f 73 61 6c 29 3b | 0d 09 77 69 74 68 20 68 |oposal);|..with h|
|00002270| 65 61 64 65 72 20 64 6f | 20 62 65 67 69 6e 0d 09 |eader do| begin..|
|00002280| 09 66 74 79 70 65 20 3a | 3d 20 27 50 49 43 54 27 |.ftype :|= 'PICT'|
|00002290| 3b 0d 09 09 68 64 72 69 | 64 20 3a 3d 20 30 3b 0d |;...hdri|d := 0;.|
|000022a0| 09 09 76 65 72 73 69 6f | 6e 20 3a 3d 20 30 3b 0d |..versio|n := 0;.|
|000022b0| 09 65 6e 64 3b 0d 09 69 | 66 20 54 68 65 50 69 63 |.end;..i|f ThePic|
|000022c0| 20 3c 3e 20 6e 69 6c 20 | 74 68 65 6e 20 62 65 67 | <> nil |then beg|
|000022d0| 69 6e 0d 09 09 53 46 50 | 75 74 46 69 6c 65 28 53 |in...SFP|utFile(S|
|000022e0| 79 73 74 65 6d 2e 53 46 | 50 75 74 50 6f 69 6e 74 |ystem.SF|PutPoint|
|000022f0| 2c 20 27 53 61 76 65 20 | 67 72 61 70 68 20 61 73 |, 'Save |graph as|
|00002300| c9 27 2c 20 50 72 6f 70 | 6f 73 61 6c 2c 20 6e 69 |.', Prop|osal, ni|
|00002310| 6c 2c 20 74 65 6d 70 52 | 65 70 6c 79 29 3b 0d 09 |l, tempR|eply);..|
|00002320| 09 69 66 20 74 65 6d 70 | 72 65 70 6c 79 2e 67 6f |.if temp|reply.go|
|00002330| 6f 64 20 74 68 65 6e 20 | 62 65 67 69 6e 20 7b 74 |od then |begin {t|
|00002340| 72 79 20 74 6f 20 6f 70 | 65 6e 20 66 69 6c 65 7d |ry to op|en file}|
|00002350| 0d 09 09 09 69 66 20 63 | 72 65 61 74 65 28 74 65 |....if c|reate(te|
|00002360| 6d 70 72 65 70 6c 79 2e | 66 6e 61 6d 65 2c 20 74 |mpreply.|fname, t|
|00002370| 65 6d 70 72 65 70 6c 79 | 2e 56 52 65 66 4e 75 6d |empreply|.VRefNum|
|00002380| 2c 20 27 4d 44 50 4c 27 | 2c 20 27 50 49 43 54 27 |, 'MDPL'|, 'PICT'|
|00002390| 29 20 3c 3e 20 6e 6f 65 | 72 72 20 74 68 65 6e 0d |) <> noe|rr then.|
|000023a0| 09 09 09 65 6c 73 65 20 | 62 65 67 69 6e 0d 09 09 |...else |begin...|
|000023b0| 09 09 74 65 6d 70 65 72 | 72 20 3a 3d 20 46 53 4f |..temper|r := FSO|
|000023c0| 70 65 6e 28 74 65 6d 70 | 72 65 70 6c 79 2e 66 6e |pen(temp|reply.fn|
|000023d0| 61 6d 65 2c 20 74 65 6d | 70 72 65 70 6c 79 2e 56 |ame, tem|preply.V|
|000023e0| 52 65 66 4e 75 6d 2c 20 | 74 65 6d 70 72 65 66 29 |RefNum, |tempref)|
|000023f0| 3b 0d 09 09 09 09 68 6c | 6f 63 6b 28 68 61 6e 64 |;.....hl|ock(hand|
|00002400| 6c 65 28 74 68 65 50 69 | 63 29 29 3b 0d 09 09 09 |le(thePi|c));....|
|00002410| 09 63 6f 75 6e 74 20 3a | 3d 20 35 31 32 3b 0d 09 |.count :|= 512;..|
|00002420| 09 09 09 74 65 6d 70 65 | 72 72 20 3a 3d 20 46 73 |...tempe|rr := Fs|
|00002430| 57 72 69 74 65 28 74 65 | 6d 70 72 65 66 2c 20 63 |Write(te|mpref, c|
|00002440| 6f 75 6e 74 2c 20 40 68 | 65 61 64 65 72 29 3b 0d |ount, @h|eader);.|
|00002450| 09 09 09 09 63 6f 75 6e | 74 20 3a 3d 20 67 65 74 |....coun|t := get|
|00002460| 68 61 6e 64 6c 65 73 69 | 7a 65 28 48 61 6e 64 6c |handlesi|ze(Handl|
|00002470| 65 28 54 68 65 50 69 63 | 29 29 3b 0d 09 09 09 09 |e(ThePic|));.....|
|00002480| 74 65 6d 70 65 72 72 20 | 3a 3d 20 46 73 57 72 69 |temperr |:= FsWri|
|00002490| 74 65 28 74 65 6d 70 72 | 65 66 2c 20 63 6f 75 6e |te(tempr|ef, coun|
|000024a0| 74 2c 20 50 74 72 28 74 | 68 65 70 69 63 5e 29 29 |t, Ptr(t|hepic^))|
|000024b0| 3b 7b 77 72 69 74 65 20 | 70 69 63 74 75 72 65 20 |;{write |picture |
|000024c0| 63 6f 6e 74 65 6e 74 73 | 7d 0d 09 09 09 09 68 75 |contents|}.....hu|
|000024d0| 6e 6c 6f 63 6b 28 68 61 | 6e 64 6c 65 28 74 68 65 |nlock(ha|ndle(the|
|000024e0| 50 69 63 29 29 3b 0d 09 | 09 09 09 74 65 6d 70 65 |Pic));..|...tempe|
|000024f0| 72 72 20 3a 3d 20 66 73 | 63 6c 6f 73 65 28 74 65 |rr := fs|close(te|
|00002500| 6d 70 72 65 66 29 3b 7b | 63 6c 6f 73 65 20 20 66 |mpref);{|close f|
|00002510| 69 6c 65 7d 0d 09 09 09 | 65 6e 64 3b 0d 09 09 65 |ile}....|end;...e|
|00002520| 6e 64 3b 0d 0d 09 65 6e | 64 3b 0d 65 6e 64 3b 0d |nd;...en|d;.end;.|
|00002530| 0d 7b 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.{======|========|
|00002540| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002550| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002560| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002570| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 7d |========|=======}|
|00002580| 0d 0d 0d 50 52 4f 43 45 | 44 55 52 45 20 64 6f 73 |...PROCE|DURE dos|
|00002590| 61 76 65 3b 0d 76 61 72 | 20 54 68 65 50 69 63 3a |ave;.var| ThePic:|
|000025a0| 50 69 63 48 61 6e 64 6c | 65 3b 0d 09 54 68 65 46 |PicHandl|e;..TheF|
|000025b0| 72 6f 6e 74 57 69 6e 64 | 6f 77 3a 57 69 6e 64 6f |rontWind|ow:Windo|
|000025c0| 77 50 74 72 3b 0d 42 45 | 47 49 4e 0d 09 43 41 53 |wPtr;.BE|GIN..CAS|
|000025d0| 45 20 69 74 73 43 6d 64 | 4e 75 6d 62 65 72 20 4f |E itsCmd|Number O|
|000025e0| 46 0d 09 09 63 53 61 76 | 65 20 3a 20 0d 09 09 3b |F...cSav|e : ...;|
|000025f0| 0d 09 09 63 53 61 76 65 | 41 73 20 3a 20 7b 74 68 |...cSave|As : {th|
|00002600| 69 73 20 69 73 20 61 20 | 62 61 64 2c 20 62 75 74 |is is a |bad, but|
|00002610| 20 68 65 6c 70 66 75 6c | 20 65 78 61 6d 70 6c 65 | helpful| example|
|00002620| 2e 20 69 66 20 74 68 65 | 20 66 72 6f 6e 74 77 69 |. if the| frontwi|
|00002630| 6e 64 6f 77 20 68 61 73 | 20 61 20 70 69 63 74 75 |ndow has| a pictu|
|00002640| 72 65 2c 0d 09 09 77 65 | 20 73 61 76 65 20 69 74 |re,...we| save it|
|00002650| 20 69 6e 20 61 20 50 69 | 63 74 20 66 69 6c 65 2c | in a Pi|ct file,|
|00002660| 20 61 6e 64 20 63 6c 61 | 69 6d 20 74 6f 20 62 65 | and cla|im to be|
|00002670| 20 4d 61 63 44 72 61 77 | 7d 0d 09 09 62 65 67 69 | MacDraw|}...begi|
|00002680| 6e 0d 09 09 09 54 68 65 | 46 72 6f 6e 74 57 69 6e |n....The|FrontWin|
|00002690| 64 6f 77 3a 3d 66 72 6f | 6e 74 77 69 6e 64 6f 77 |dow:=fro|ntwindow|
|000026a0| 3b 0d 09 09 09 69 66 20 | 54 68 65 46 72 6f 6e 74 |;....if |TheFront|
|000026b0| 57 69 6e 64 6f 77 3c 3e | 6e 69 6c 20 74 68 65 6e |Window<>|nil then|
|000026c0| 20 62 65 67 69 6e 0d 09 | 09 09 09 54 68 65 50 69 | begin..|...ThePi|
|000026d0| 63 3a 3d 50 69 63 48 61 | 6e 64 6c 65 28 47 65 74 |c:=PicHa|ndle(Get|
|000026e0| 57 69 6e 64 6f 77 50 69 | 63 28 54 68 65 46 72 6f |WindowPi|c(TheFro|
|000026f0| 6e 74 57 69 6e 64 6f 77 | 29 29 3b 0d 09 09 09 09 |ntWindow|));.....|
|00002700| 69 66 20 54 68 65 50 69 | 63 3c 3e 6e 69 6c 20 74 |if ThePi|c<>nil t|
|00002710| 68 65 6e 20 73 61 76 65 | 61 73 28 54 68 65 50 69 |hen save|as(ThePi|
|00002720| 63 29 3b 0d 09 09 09 65 | 6e 64 3b 0d 09 09 65 6e |c);....e|nd;...en|
|00002730| 64 3b 0d 09 09 63 53 61 | 76 65 43 6f 70 79 20 3a |d;...cSa|veCopy :|
|00002740| 20 0d 09 09 3b 0d 09 09 | 4f 54 48 45 52 57 49 53 | ...;...|OTHERWIS|
|00002750| 45 20 7b 73 68 6f 75 6c | 64 20 6e 6f 74 20 6f 63 |E {shoul|d not oc|
|00002760| 63 75 72 7d 0d 09 45 4e | 44 3b 0d 45 4e 44 3b 0d |cur}..EN|D;.END;.|
|00002770| 0d 50 52 4f 43 45 44 55 | 52 45 20 64 6f 63 6c 6f |.PROCEDU|RE doclo|
|00002780| 73 65 3b 0d 42 45 47 49 | 4e 0d 09 43 41 53 45 20 |se;.BEGI|N..CASE |
|00002790| 69 74 73 43 6d 64 4e 75 | 6d 62 65 72 20 4f 46 0d |itsCmdNu|mber OF.|
|000027a0| 09 09 63 43 6c 6f 73 65 | 20 3a 20 0d 09 09 3b 0d |..cClose| : ...;.|
|000027b0| 09 09 4f 54 48 45 52 57 | 49 53 45 20 7b 73 68 6f |..OTHERW|ISE {sho|
|000027c0| 75 6c 64 20 6e 6f 74 20 | 6f 63 63 75 72 7d 0d 09 |uld not |occur}..|
|000027d0| 45 4e 44 3b 0d 45 4e 44 | 3b 0d 00 00 00 00 00 00 |END;.END|;.......|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002800| 00 00 01 00 00 00 02 15 | 00 00 01 15 00 00 00 5e |........|.......^|
|00002810| 46 07 4e 45 54 57 4f 52 | 4b 07 47 45 4e 45 52 49 |F.NETWOR|K.GENERI|
|00002820| 43 08 53 54 44 54 4f 4f | 4c 53 00 04 53 41 4e 45 |C.STDTOO|LS..SANE|
|00002830| 0b 74 61 73 6b 2e 69 6d | 70 6c 2e 70 02 00 00 00 |.task.im|pl.p....|
|00002840| 54 45 58 54 4d 50 53 20 | 01 00 ff ff ff ff 00 00 |TEXTMPS |........|
|00002850| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00002860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002870| 00 00 a4 00 20 70 00 00 | 27 5a 00 00 02 73 bd 00 |.... p..|'Z...s..|
|00002880| 06 5c 74 00 01 00 0a 00 | 0c 0a 4e 65 74 4e 65 73 |.\t.....|..NetNes|
|00002890| 73 69 65 ba 00 02 67 73 | 00 02 31 32 00 06 54 61 |sie...gs|..12..Ta|
|000028a0| 73 6b 2e 70 00 12 63 6f | 6e 66 69 67 75 72 61 74 |sk.p..co|nfigurat|
|000028b0| 69 6f 6e 20 76 73 20 33 | 00 00 00 00 00 00 08 ac |ion vs 3|........|
|000028c0| 00 e8 0b b7 bf ff ff ff | 55 8f 3f 06 01 00 03 b2 |........|U.?.....|
|000028d0| 01 00 00 36 00 00 00 00 | 00 00 00 00 01 00 06 00 |...6....|........|
|000028e0| 00 00 00 64 01 00 08 ac | 00 00 00 00 a4 00 1b 89 |...d....|........|
|000028f0| 00 2d 00 76 ff af 00 12 | 8d 1a e5 0b 26 95 20 6d |.-.v....|....&. m|
|00002900| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 74 73 20 |...H..Mo|naco.ts |
|00002910| 64 65 66 69 6e 65 64 20 | 69 6e 20 53 74 64 54 6f |defined |in StdTo|
|00002920| 6f 6c 73 7d 0d 0d 00 06 | 00 04 00 2a 00 03 01 dd |ols}....|...*....|
|00002930| 02 7d 00 29 00 07 01 6a | 01 3e a5 c3 2d 88 00 00 |.}.)...j|.>..-...|
|00002940| 19 40 00 00 19 45 00 00 | 17 6f 01 00 00 00 00 74 |.@...E..|.o.....t|
|00002950| 00 07 00 00 00 74 00 00 | 00 7a 07 4d 79 49 6e 69 |.....t..|.z.MyIni|
|00002960| 74 00 00 00 12 fd 00 00 | 13 03 07 4d 79 54 61 73 |t.......|...MyTas|
|00002970| 6b 00 00 00 18 49 00 00 | 18 52 09 4d 79 43 6c 65 |k....I..|.R.MyCle|
|00002980| 61 6e 55 70 00 00 1a e6 | 00 00 1a ec 07 64 6f 6f |anUp....|.....doo|
|00002990| 70 65 6e 00 00 00 1f 88 | 00 00 1f 8e 07 73 61 76 |pen.....|.....sav|
|000029a0| 65 61 73 00 00 00 25 0d | 00 00 25 13 07 64 6f 73 |eas...%.|..%..dos|
|000029b0| 61 76 65 00 00 00 26 fb | 00 00 27 02 07 64 6f 63 |ave...&.|..'..doc|
|000029c0| 6c 6f 73 65 00 00 00 1e | 00 2a 00 03 01 dd 02 7d |lose....|.*.....}|
|000029d0| 00 29 00 07 01 6a 01 3e | 00 00 17 6f 00 00 00 00 |.)...j.>|...o....|
|000029e0| 00 00 00 00 00 00 00 00 | 00 2b 01 23 80 00 00 00 |........|.+.#....|
|000029f0| 05 31 2e 32 2e 33 1e 31 | 2e 32 2e 33 a9 31 39 39 |.1.2.3.1|.2.3.199|
|00002a00| 31 54 68 65 20 4e 65 74 | 57 6f 72 6b 20 50 72 6f |1The Net|Work Pro|
|00002a10| 6a 65 63 74 20 00 00 01 | 00 00 00 02 15 00 00 01 |ject ...|........|
|00002a20| 15 00 00 00 5e 00 48 3c | 78 08 d2 00 00 00 1c 00 |....^.H<|x.......|
|00002a30| 5e 00 01 4d 50 53 52 00 | 02 00 12 76 65 72 73 00 |^..MPSR.|...vers.|
|00002a40| 00 00 36 03 ed ff ff 00 | 00 00 00 00 00 00 00 03 |..6.....|........|
|00002a50| ef ff ff 00 00 00 4c 00 | 00 00 00 03 f0 ff ff 00 |......L.|........|
|00002a60| 00 00 c4 00 00 00 00 00 | 02 ff ff 20 00 00 e6 00 |........|... ....|
|00002a70| 48 39 3c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |H9<.....|........|
+--------+-------------------------+-------------------------+--------+--------+